<?php

namespace app\teacher\model;

use app\common\model\BaseModel;
use think\Model;

class Notice extends BaseModel
{
    /**
     * 最新公告
     */
    public static function getLast()
    {
        return self::where(static::whereOnline())->order(static::WEIGH_DESC)->limit(6)->select();
    }

    /**
     * 列表
     */
    public static function getAll($size = 20)
    {
        return self::where(static::whereOnline())->order(static::WEIGH_DESC)->paginate($size);
    }
}
